cmake_minimum_required(VERSION 3.24)
project(snake)

set(CMAKE_CXX_STANDARD 17)

add_executable(snake main.cpp)

find_package (SFML 2.5 COMPONENTS graphics window system REQUIRED)
find_package(OpenGL REQUIRED)

target_link_libraries(snake sfml-graphics)
target_link_libraries(snake ${OPENGL_LIBRARIES})

configure_file(res/field_bg.png res/field_bg.png COPYONLY)
configure_file(res/bricks.png res/bricks.png COPYONLY)
configure_file(res/bricks2.png res/bricks2.png COPYONLY)
configure_file(res/foods/pig00.png res/foods/pig00.png COPYONLY)
configure_file(res/foods/rabbit00.png res/foods/rabbit00.png COPYONLY)
configure_file(res/foods/bear00.png res/foods/bear00.png COPYONLY)
configure_file(res/snake/head.png res/snake/head.png COPYONLY)
configure_file(res/snake/tail.png res/snake/tail.png COPYONLY)
configure_file(res/snake/body.png res/snake/body.png COPYONLY)
configure_file(res/snake/corner.png res/snake/corner.png COPYONLY)
